﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;

// Class representing 1 row of the RecipeIngredients table (DB_version 3) 

namespace StoveTop.Models
{
	class RecipeIngredient
	{
		private int _id;
		private int _recipeId;
		private int _ingredientId;
		private decimal _quantityRequired;
		private string _units;
		private string _prepNotes;

		// Constructors
		public RecipeIngredient() {
		}
		public RecipeIngredient(int id, int recipeId, int ingredientId, decimal quantityRequired, string units, string prepNotes){
			_id = id;
			_recipeId = recipeId;
			_ingredientId = ingredientId;
			_quantityRequired = quantityRequired;
			_units = units;
			_prepNotes = prepNotes;
		}

		// Setters
		public void SetId(int id) {
			_id = id;
		}
		public void SetRecipeId(int recipeId) {
			_recipeId = recipeId;
		}
		public void SetIngredientId(int ingredientId) {
			_ingredientId = ingredientId;
		}
		public void SetQuantityRequired (decimal quantityRequired) {
			_quantityRequired = quantityRequired;
		}
		public void SetUnits (string units) {
			_units = units;
		}
		public void SetPrepNotes (string prepNotes) {
			_prepNotes	= prepNotes;
		}
		// Getters
		public int GetId() {
			return _id;
		}
		public int GetRecipeId() {
			return _recipeId;
		}
		public int GetIngredientId () {
			return _ingredientId;
		}
		public decimal GetQuantityRequired() {
			return _quantityRequired;
		}
		public string GetUnits() {
			return _units;
		}
		public string GetPrepNotes() {
			return _prepNotes;
		}

		public override string ToString ()
		{
			return "RecipeIngredient [id=" + _id.ToString() + ", recipeId=" + _recipeId.ToString() + ", ingredId=" + _ingredientId.ToString()
				+ ", quantRequired=" + _quantityRequired.ToString() + ", units=" + _units + ", prepNotes=" + _prepNotes + "]";
		}
	}
}


